#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UTable.Objects;

namespace UTable.ObjectManager.Commands
{
    public class ObjectCommand: ICommand
    {
        private ObjectCommandType _subType;
        private Object _param;
        private IObject _receiver;

        public ObjectCommand(IObject receiver, ObjectCommandType type, Object param)
        {
            this._receiver = receiver;
            this._subType = type;
            this._param = param;
        }

        #region ICommand Members

        public CommandType Type
        {
            get { return CommandType.OBJECT; }
        }

        public ObjectCommandType SubType { get { return _subType; } }

        public Object Param { get { return _param; } }

        public IObject Receiver
        {
            get { return _receiver; }
            set { _receiver = value; }
        }

        public bool Authorized
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool ConflictResolved
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
        #endregion
    }

    public enum ObjectCommandType
    {
        Input,
        NotMappedInput,
        Translate,
        Rotate,
        Resize,
        Scale,
        Create,
        Remove,
        Insert,
        Close,
        Join,
        Unjoin,
        Copy,
        Maximize,
        Minimize,
        Restore,
        ChangeZIndex,
        ChangeVisibility,
        ChangeOperatingState,
        ChangeLayoutState,
        ChangeClip,
        ChangeRotateCenter,
        ChangeScaleCenter,
        ChangeOpaticy,
        ChangeIsHiTestVisible,
    }
}
